package com.donleo.alipay.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.donleo.alipay.model.PayLog;
import com.donleo.alipay.model.RefundLog;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author liangd
 * @since 2021-03-06 15:07
 */
public interface PayLogService extends IService<PayLog> {
    /**
     * 支付接口调用
     *
     * @param price    价格
     * @param name     商品名字
     * @param response 响应
     */
    void pay(String price, String name, HttpServletResponse response);

    /**
     * 异步通知
     *
     * @param request 请求参数
     * @return String
     */
    String notifyPay(HttpServletRequest request);

    /**
     * 交易查询接口
     *
     * @param request HttpServletRequest
     * @return String
     */
    String queryPayLog(HttpServletRequest request);

    /**
     * 关闭交易接口
     *
     * @param request HttpServletRequest
     * @return String
     */
    String closePayLog(HttpServletRequest request);

    /**
     * 退款接口(支持部分退款)
     *
     * @param request HttpServletRequest
     * @return String
     */
    String refundPay(HttpServletRequest request);

    /**
     * 退款接口查询
     *
     * @param request HttpServletRequest
     * @return String
     */
    String refundQuery(HttpServletRequest request);

    /**
     * 账单查询
     *
     * @param request HttpServletRequest
     * @return String
     */
    String downloadPayLog(HttpServletRequest request);

    /**
     * 本地退款记录查询
     * @return String
     */
    List<RefundLog> localPayLogQuery();
}
